package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.DeptBean;
import com.project.bean.EmployeeBean;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IDeptMapper extends BaseMapper<DeptBean> {

    public void addEmployeeList(@Param("deptId") Integer deptId,
                                @Param("emList") List<EmployeeBean> emList);
    @Delete("delete from t_employee where fk_deptId=#{id};" +
            "delete from t_dept where pk_deptId=#{id};")
    public void del(Integer id);
}
